/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include "UI/Widget.h"
#include "UI/ui绘制模板.h"
#include "UI/布局.h"


class C_视频框 : public C_Widget {
	

public:
	C_视频框(S_UI渲染环境& ctx, uint8 缓存数量=3);
	~C_视频框();

	bool					m_槽纹理更新;
	S_2D笔刷				m_笔刷;
	std::vector<S_纹理*>	m_帧纹理;

	ui_绘制模板_预设图形 m_框部件;
	ui_绘制模板_纹理	   m_视口纹理绘制;

	//S_View属性				m_View属性;


	void f_填充像素(uint8* pix, uvec3 dim, uint8 color_bit);
	void f_set槽纹理(S_纹理* tex, uint8 offset);

};


void f_视频框_填充视频捕捉点(C_视频框* box, const std::vector<S_Rect2Df>& 点坐标, const std::vector<S_RGBA8UI>& 点颜色);
void f_视频框_设置选取(C_视频框* box, const S_Rect2Df& 点坐标, const S_RGBA8UI& 点颜色);
void f_视频框_关闭选取(C_视频框* box);





class C_图像框 : public C_Widget {

public:
	C_图像框(S_UI渲染环境& ctx);
	~C_图像框();

	ui_绘制模板_纹理	m_背景绘制;
	E_笔刷类型			m_纹理绘制类型;

	S_纹理集*			m_默认纹理集;

	S_Props	m_纹理;
	S_Props m_纹理属性;
};



class C_图像集视口 : public C_Widget {

public:
	C_图像集视口(S_UI渲染环境& ctx);
	~C_图像集视口();

	uint32 m_纹理绘制;

	S_纹理集* m_默认纹理集;

	S_Props	m_纹理;
	S_Props m_纹理属性;
	S_Props m_纹理绘制模式;
};




class C_图形视口 : public C_Widget {

public:
	C_图形视口(S_UI渲染环境& ctx);
	~C_图形视口();

	std::u16string		m_图形对象名称;
	std::vector<uvec2>	m_元素ID;
};


